-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Conversation
var proc = fork(__filename, ['child']); | ||
|
||
proc.on('message', common.mustCall(function(msg) { | ||
assert.equal(typeof msg , 'string'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: space before comma. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh. thanks. I just did a replace on the () that were there.
I’m not sure about the impact of Are there platforms doing that currently, and if so what version of libuv do they track/ship? EDIT: Regarding backward compatibility, I also wonder if libuv/libuv#156 could , by introducing an important behavior change that is sort of an API change, break users of such platforms. |
Just for the record, the build fails on SmartOS currently. This build issue had been fixed by the fact that the tty related change had been reverted. At some point later, it was put back, but in a version of libuv > 1.02 if I remember correctly. I had sent a PR that fixed the original breaking change, I'm not sure if it still applies though. |
I think we should also track an issue to add dtrace probes support back. In my opinion it's very useful for some users and I would like to at least track it somewhere. Thoughts? |
7ffc17a
to
6e21bd0
Compare
6e21bd0
to
42371f7
Compare
@trevnorris The SmartOS build is fixed by misterdjules@8ba154b, and I reworded the header of e0b44d6 into misterdjules@137d331. The SmartOS build fix will need to be upstreamed, should we float the patch first and upstream it, or upstream it first so that we don't have to patch it (but that would delay the upgrade)? |
General Dependency UpgradesSince Node.js doesn't currently define its own API/ABI the only way for users to build and ship binary addons is by building against the libuv and V8 that Node.js releases are built against (and in turn shipped). This also applies to c-ares, zlib, openssl, etc We can upgrade any of our tightly coupled dependencies in a patch release, so long as those upgrades meet a couple requirements:
Presuming the upgrade to the library meets those requirements, the only follow up to that is:
Since we support/allow building and linking against shared versions of our dependencies, consumers may not upgrade them in sync, so the node binary (and also their binary addons) must continue to work with whatever version of the shared library they have installed. This UpgradeFrom an API/ABI perspective most of this looks fine, save for the change to While there is a C++ level API compatibility change, what's not entirely clear is if the I have not evaluated all the behavioral changes to know any further potential impacts. |
Ran the node.js' tests with this upgrade and the fix for the SmartOS build, and so far on UNICEs all tests pass except for one test on SmartOS. |
It also seems to break a lot of tests on Windows. I haven't had the time to investigate those though. |
I might have missed a floating patch, though I thought that's what "lib: fix stdio/ipc sync i/o regression" was supposed to fix. |
Investigating those Windows failures.... |
I haven't completed the investigation yet (I will resume on Monday), but I have determined that the second commit in this PR (42371f7) and not the libuv uddate is causing the WIndows child_process-related failures. |
See nodejs/node#774 - apparently blocking pipe I/O is not (always?) supported on Windows but to what extent is unclear to me. |
I have opened a PR in libuv that addresses the blocking pipe issues on Windows. I think we'll have to float a patch on here. @trevnorris is it ok for me to add a commit to this PR? |
@orangemocha be my guest. |
9b4db67
to
14f00ed
Compare
@orangemocha Thanks for the PR, and great work! I've already cherry-picked your commit onto this PR. @misterdjules This should be gtg for another test on Jenkins. |
Thanks! Let's see what Jenkins says: http://jenkins.nodejs.org/job/node-accept-pull-request/26/ (testing only) |
I could use some help on this one. I don't have OSX, and can't find a single change regards to a |
Because we are floating several patches on top of libuv, make that apparent in the version number.
It doesn't seem to be a libuv issue, but an issue on the OSX machine. All static libraries are failing to compile there. |
@trevnorris yeah, that will do, thanks a lot! |
@orangemocha @trevnorris @saghul The build issue on OSX was due to a problem in the build slave configuration, and I'm the one who broke it when fixing the libuv jenkins job. My apologies for that. It should be fixed now, but let me know if you still have issues with it. Sorry again! |
@saghul @trevnorris FWIW, I'm fine with @saghul's suggestion in #9179 (comment) and with @trevnorris' change. |
@@ -138,6 +138,7 @@ extern "C" { | |||
XX(EOF, "end of file") \ | |||
XX(ENXIO, "no such device or address") \ | |||
XX(EMLINK, "too many links") \ | |||
XX(EHOSTDOWN, "host is down") \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like another API change that might be a bit more difficult not to use within the node code base, but at that point I don't know what other options we have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.
@joyent/node-coreteam besides the API changes, including the latest one in a 1.4.x patch release, LGTM. Do we have any option other than just landing these API changes in node? Any other way of moving forward I can think of requires a lot of maintenance from node for which we don't have proper tooling right now. |
@misterdjules: That change is somewhere between a bugfix and an API change. libuv doesn't use the symbol but some OS-es generate it so we now export it. The alternative is an assert, which quite some people where getting while downloading packages with NPM, for example, which is not desired. FWIW this particular change can be "ifdef tested". |
@trevnorris Assigned to you, let me know if you have any trouble running the node-accept-pull-request job on Jenkins. Thank you! |
@saghul OK, my concern was more that someone using |
@misterdjules that is indeed a possibility, unfortunately. |
Reviewed-By: Julien Gilli <[email protected]> PR-URL: #9179
The -fno-strict-aliasing flag was added to fix compilation warnings when building Node.js with GCC <= 4.4 Reviewed-By: Julien Gilli <[email protected]> PR-URL: #9179
process.send() should be synchronous, it should block until the message has been sent in full, but it wasn't after the second-to-last libuv upgrade because of commit libuv/libuv@393c1c5 ("unix: set non-block mode in uv_{pipe,tcp,udp}_open"), which made its way into io.js in commit 07bd05b ("deps: update libuv to 1.2.1"). Commit libuv/libuv@b36d4ff ("unix: implement uv_stream_set_blocking()") as landed in io.js in commit 9681fca ("deps: update libuv to 1.4.0") makes it possible to restore the synchronous behavior again and that's precisely what this commit does. The same line of reasoning applies to `net.Socket({ fd: 1 })`: creating a socket object from a stdio file descriptor, like the `process.stdout` getter does, should put the file descriptor in blocking mode for compatibility reasons. Reviewed-By: Julien Gilli <[email protected]> PR-URL: #9179
Float patch to fix pipe on Windows. Original commit message: win: fix pipe blocking writes In the code path for pipe blocking writes, WriteFile is already posting a completion packet to the I/O completion port. POST_COMPLETION_FOR_REQ was causing the same request to get returned twice by GetCompletionStatusEx. Also on the same code path, we were waiting on the wrong event. We need to update queued_bytes and write_queue_size when a blocking write request completes asynchronously. Ref: libuv/libuv#238 Reviewed-By: Julien Gilli <[email protected]> PR-URL: #9179
Float patch to fix setsockopt for multicast on Solaris and derivatives. Original commit message: solaris: fix setsockopt for multicast options On Solaris and derivatives such as SmartOS, the length of socket options for multicast and ttl options is not always sizeof(char). This fixes the udp_options and udp_options6 tests. Ref: libuv/libuv#243 Reviewed-By: Julien Gilli <[email protected]> PR-URL: #9179
Original commit message: darwin: fix size calculation in select() fallback Apple's `fd_set` stores its bits in an array of 32-bit integers, which means `FD_ISSET()` may read out of bounds if we allocate storage at byte granularity. There's also a chance that the `select()` call could corrupt the heap, although I didn't investigate that. This issue was discovered by LLVM's AddressSanitizer which caught `FD_ISSET()` trying to read out of bounds. Ref: libuv/libuv#241 Reviewed-By: Julien Gilli <[email protected]> PR-URL: #9179
Because we are floating several patches on top of libuv, make that apparent in the version number. Reviewed-By: Julien Gilli <[email protected]> PR-URL: #9179
Landed in 7a37910, c0766eb, 2411bea, 3cce8ab, 9613ac7, 2fdeb7e and a930870. Thank you @trevnorris @saghul, @orangemocha and everyone involved 👍 |
The -fno-strict-aliasing flag was added to fix compilation warnings when building Node.js with GCC <= 4.4 Reviewed-By: Julien Gilli <[email protected]> PR-URL: nodejs#9179
The -fno-strict-aliasing flag was added to fix compilation warnings when building Node.js with GCC <= 4.4 Reviewed-By: Julien Gilli <[email protected]> PR-URL: nodejs#9179 PR: nodejs#25141 PR-URL: nodejs#25141 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Julien Gilli <[email protected]>
Update libuv to 1.4.0 and land a fix that changed default behavior to preserve backwards compatibility.
R=@tjfontaine @misterdjules